<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            position: relative;
            width: 400px;
            height: 40px;
            border: 2px rgb(122, 87, 87) solid;
        }
        div::after {
            content: '';
            position: absolute;
            top: 14px;
            right: 16px;
            width: 10px;
            height: 10px;
            border-bottom: 2px red solid;
            border-right: 2px red solid;
            transform: rotate(45deg);
            transition: all 0.5s;
        }
        /* 鼠标经过div，然后旋转里面的div中的after */
        div:hover::after {
            transform: rotate(225deg);
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>